package router

import (
	"jgt-oper/src/context"
	"jgt-oper/src/web"

	"github.com/facebookgo/inject"
	"github.com/teambition/gear"
)

// WebEVMap 运营端企业-门禁管理 相关路由
func WebEVMap(g *inject.Graph, router *gear.Router) {
	a := new(web.EVController)
	err := g.Provide(&inject.Object{Value: a})
	if err != nil {
		panic(err)
	}

	router.Get("/enterprise-visit/page", context.WrapContext(a.QVisitPage))
	router.Put("/enterprise-visit/delete/:id", context.WrapContext(a.Cancel))
}
